package com.magist.manage.web;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.WebApplicationInitializer;

@ServletComponentScan
@ImportResource("classpath:config/spring-ds.xml")
@SpringBootApplication(scanBasePackages="com.magist.manage")
@MapperScan("com.magist.manage.*.dao")
@EnableScheduling
public class WebApplication
		extends	SpringBootServletInitializer implements WebApplicationInitializer {


	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application){

		return application.sources(WebApplication.class);
	}

	public static void main(String[] args) {
		SpringApplication.run(WebApplication.class, args);
	}
}
